def input_pwd():
    pwd = input("请输入密码：")

    if len(pwd) >= 8:
        return pwd

    ex = Exception("LengthError", "长度不够")
    raise ex


print(input_pwd())
